﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Configuration;


public partial class Register : System.Web.UI.Page
{
    ServiceReference1.MyWebServiceSoapClient servis = new ServiceReference1.MyWebServiceSoapClient();
    protected void Page_Load(object sender, EventArgs e)
    {
              

    }

    protected void Button1_Click(object sender, EventArgs e)
    {


        string returnMessage;

        returnMessage = servis.CreateUser(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text,"~/Images/"+ FileUpload1.FileName);
        if (returnMessage.Equals("OK"))
        {
            Response.Redirect("Login.aspx");
        }
        else
        {
            Label1.Text = returnMessage;
        }
    }
}